package com.m3839.sdk.common.widget.floatview;

import android.view.View;

/**
 * {@link View.OnClickListener} 包装类
 *
 * @author chenbaoyang
 * @create 2021/11/01
 */
final class ViewClickWrapper implements View.OnClickListener {

    private final HykbFloatView floatView;
    private final OnClickListener mListener;

    ViewClickWrapper(HykbFloatView floatView, View view, OnClickListener listener) {
        this.floatView = floatView;
        mListener = listener;

        view.setOnClickListener(this);
    }

    @SuppressWarnings("unchecked")
    @Override
    public final void onClick(View v) {
        mListener.onClick(floatView, v);
    }
}